//
//  StudentsEnjoyableTableViewCell.m
//  ECBBusinessCamp
//
//  Created by rimi on 16/6/17.
//  Copyright © 2016年 邓毕华. All rights reserved.
//

#import "StudentsEnjoyableTableViewCell.h"

@implementation StudentsEnjoyableTableViewCell
#pragma mark 🌷🌷🌷life cycle🌷🌷🌷
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        // 修改选中效果
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        // 添加视图
        [self addSubview:self.mainView];
        
        // 自动布局
        [_mainView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.offset(SCREEN_WIDTH * 0.94);
            make.centerX.equalTo(self);
            make.top.offset(SCREEN_HEIGHT * 0.015);
            make.bottom.offset(SCREEN_HEIGHT * - 0.015);
        }];
    }
    return self;
}

#pragma mark 🌷🌷🌷getters and setters🌷🌷🌷
- (TopicInformationView *)mainView {
    if (!_mainView) {
        _mainView = [[TopicInformationView alloc] init];
        _mainView.backgroundColor = RGB_COLOR(245, 245, 245, 1);
    }
    return _mainView;
}

@end
